package com.server.impl;

import com.dao.productcollect.ProductcollectMapper;
import com.entry.Productcollect;
import com.server.ProductcollectService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductcollectServiceImpl implements ProductcollectService {

    @Resource
    ProductcollectMapper productcollectMapper;

    @Override
    public int addProductCollect(int productcollect_product_id, int productcollect_member_id) {
        return productcollectMapper.addProductCollect(productcollect_product_id, productcollect_member_id);
    }

    @Override
    public int getIsCollect(int productcollect_product_id, int productcollect_member_id) {
        return productcollectMapper.getIsCollect(productcollect_product_id,productcollect_member_id );
    }

    @Override
    public List<Productcollect> getAllProductCollect(int productcollect_member_id) {
        return productcollectMapper.getAllProductCollect(productcollect_member_id);
    }

    @Override
    public int RemoveProductCollect(int productcollect_product_id, int productcollect_member_id) {
        return productcollectMapper.RemoveProductCollect(productcollect_product_id, productcollect_member_id);
    }
}
